let list =[{
    "id": "484878225604881989",
    "priceOrderId": "484878225508412997",
    "productId": "478519239842469765",
    "productNickName": null,
    "buyType": "标准方案",
    "taxRate": "13",
    "unitPrice": "2100000",
    "preferentialPrice": 0,
    "discountPrice": "2100000",
    "amount": "1",
    "productTotalMoney": "2100000",
    "startPrice": null,
    "startAmount": null,
    "remark": null,
    "productName": "有梦·MK21060CS",
    "productErpCode": null,
    "productImagesUrl": "[{\"name\":\"检品机.png\",\"url\":\"/api/file/Image/annexpic/6522686a3cb46ca59a3a6271.png\",\"fileId\":\"6522686a3cb46ca59a3a6271.png\"}]",
    "crmPriceOrderProductNotGetDetailVoList": [
        {
            "id": "484878225625853509",
            "priceOrderId": "484878225508412997",
            "priceOrderProductId": "484878225604881989",
            "productNotId": "478522715469256581",
            "productNotNickName": null,
            "taxRate": "13",
            "unitPrice": "10000",
            "preferentialPrice": "0",
            "discountPrice": "0",
            "amount": "2",
            "productNotTotalMoney": "0",
            "startPrice": null,
            "startAmount": null,
            "remark": null,
            "productNotName": "检品机下料部",
            "productSort": "选配项",
            "productErpCode": null,
            "productImagesUrl": "[{\"name\":\"图片1.png\",\"url\":\"/api/file/Image/annexpic/65310aff3cb419e1f33351f3.png\",\"fileId\":\"65310aff3cb419e1f33351f3.png\"}]",
            "shu": 0,
            "imgUrl": "http://192.168.200.115:8066/api/file/Image/annexpic/65310aff3cb419e1f33351f3.png"
        },
        {
            "id": "484878225642630725",
            "priceOrderId": "484878225508412997",
            "priceOrderProductId": "484878225604881989",
            "productNotId": "478522720267540357",
            "productNotNickName": null,
            "taxRate": "13",
            "unitPrice": "8000",
            "preferentialPrice": "0",
            "discountPrice": "0",
            "amount": "2",
            "productNotTotalMoney": "0",
            "startPrice": null,
            "startAmount": null,
            "remark": null,
            "productNotName": "冷转移材料检测  . Dasla 4K",
            "productSort": "选配项",
            "productErpCode": null,
            "productImagesUrl": "[{\"name\":\"图片1.png\",\"url\":\"/api/file/Image/annexpic/65310aff3cb419e1f33351f3.png\",\"fileId\":\"65310aff3cb419e1f33351f3.png\"}]",
            "shu": 1,
            "imgUrl": "http://192.168.200.115:8066/api/file/Image/annexpic/65310aff3cb419e1f33351f3.png"
        },
        {
            "id": "484878225659407941",
            "priceOrderId": "484878225508412997",
            "priceOrderProductId": "484878225604881989",
            "productNotId": "478522723929167749",
            "productNotNickName": null,
            "taxRate": "13",
            "unitPrice": "7000",
            "preferentialPrice": "0",
            "discountPrice": "0",
            "amount": "2",
            "productNotTotalMoney": "0",
            "startPrice": null,
            "startAmount": null,
            "remark": null,
            "productNotName": "卷筒纸打孔设备",
            "productSort": "选配项",
            "productErpCode": null,
            "productImagesUrl": "[{\"name\":\"图片1.png\",\"url\":\"/api/file/Image/annexpic/65310aff3cb419e1f33351f3.png\",\"fileId\":\"65310aff3cb419e1f33351f3.png\"}]",
            "shu": 2,
            "imgUrl": "http://192.168.200.115:8066/api/file/Image/annexpic/65310aff3cb419e1f33351f3.png"
        },
        {
            "id": "484878225671990853",
            "priceOrderId": "484878225508412997",
            "priceOrderProductId": "484878225604881989",
            "productNotId": "478522715746080645",
            "productNotNickName": null,
            "taxRate": "13",
            "unitPrice": "12000",
            "preferentialPrice": "0",
            "discountPrice": "0",
            "amount": "2",
            "productNotTotalMoney": "0",
            "startPrice": null,
            "startAmount": null,
            "remark": null,
            "productNotName": "看样台",
            "productSort": "零配件",
            "productErpCode": null,
            "productImagesUrl": "[{\"name\":\"图片1.png\",\"url\":\"/api/file/Image/annexpic/65310aff3cb419e1f33351f3.png\",\"fileId\":\"65310aff3cb419e1f33351f3.png\"}]",
            "shu": 3,
            "imgUrl": "http://192.168.200.115:8066/api/file/Image/annexpic/65310aff3cb419e1f33351f3.png"
        },
        {
            "id": "484878225688768069",
            "priceOrderId": "484878225508412997",
            "priceOrderProductId": "484878225604881989",
            "productNotId": "478522715746080645",
            "productNotNickName": null,
            "taxRate": "13",
            "unitPrice": "12000",
            "preferentialPrice": "0",
            "discountPrice": "0",
            "amount": "2",
            "productNotTotalMoney": "0",
            "startPrice": null,
            "startAmount": null,
            "remark": null,
            "productNotName": "看样台",
            "productSort": "零配件",
            "productErpCode": null,
            "productImagesUrl": "[{\"name\":\"图片1.png\",\"url\":\"/api/file/Image/annexpic/65310aff3cb419e1f33351f3.png\",\"fileId\":\"65310aff3cb419e1f33351f3.png\"}]",
            "shu": 4,
            "imgUrl": "http://192.168.200.115:8066/api/file/Image/annexpic/65310aff3cb419e1f33351f3.png"
        }
    ],
    "productTotalPreferentialPrice": 0,
    "overTotalPrice": 2100000
}]

function handlerArr(list){
    for (let deepItem of list) { // 第一层循环是所有的整机
        let crmPriceOrderProductNotGetDetailVoList = []; // 配件组
        // 循环每个整机下面的配件,给配件分组
        deepItem.crmPriceOrderProductNotGetDetailVoList.forEach(item => {
            if (!crmPriceOrderProductNotGetDetailVoList.find(i => i.productSort === item.productSort)) {
                // 先判断我当前的这个临时变量里有没有这个分类
                crmPriceOrderProductNotGetDetailVoList.push({
                    productSort: item.productSort,
                    list: [item],
                });
            } else {
                let index = crmPriceOrderProductNotGetDetailVoList.findIndex(i => i.productSort == item.productSort);
                /* 用于处理改价页面的配件输入框显示隐藏 */
                crmPriceOrderProductNotGetDetailVoList[index].list.push(item);
            }
        });
        deepItem.crmPriceOrderProductNotGetDetailVoList = crmPriceOrderProductNotGetDetailVoList;
        return crmPriceOrderProductNotGetDetailVoList
    }

}

console.log(handlerArr(list));
